home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
PROGRAMMING
/
DESKLIBC
/
SOURCES.ZIP
/
DeskLib
/
!DLSources
/
Libraries
/
File
/
c
/
IsDir
< prev
next >
Wrap
Text File
|
1995-07-08
|
1KB
|
33 lines
/*
#### # # # #
# # # # # The FreeWare C library for
# # ## ### # # # # ### RISC OS machines
# # # # # # # # # # # ___________________________________
# # #### ### ## # # # #
# # # # # # # # # # Please refer to the accompanying
#### ### #### # # ##### # ### documentation for conditions of use
________________________________________________________________________
File: File.IsDir.c
Author: Copyright © 1994 Tim Browse
Version: 1.01 (03 Jun 1995)
Purpose: Checks to see if the given file is a directory.
Mods: Returns TRUE for images as well as directories.
*/
#include "DeskLib:Core.h"
#include "DeskLib:File.h"
#include "DeskLib:SWI.h"
extern BOOL File_IsDirectory(char *pathname)
{
unsigned type;
/* Get the file information */
SWI(2, 1, SWI_OS_File, 17, pathname, &type);
return ( (type & 2) ? TRUE : FALSE); /* 2 => directory found, 3 => image */
}